package com.railway.switchs.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName EmailUtil
 * @Author 魏梓晟
 * @Version 1.0
 **/
public class EmailUtil {


    public static final String PREFIX_PARAM = "";

    public static final String SUFFIX_PARAM = "";


    /**
     * 注入参数
     * @param str
     * @param paramMap
     * @return
     */
    public static String injectionParam(String str, Map<String,String> paramMap){
        for (Map.Entry<String,String> entry : paramMap.entrySet()) {
            str = str.replaceAll(PREFIX_PARAM + entry.getKey() + SUFFIX_PARAM, entry.getValue());
        }
        return str;
    }

    public static void main(String[] args) {
        String aa = "haaaahaha$aa$,";
        Map<String,String> map = new HashMap<>();
        map.put("aa","解啊");
        System.out.println(aa.replaceAll("$aa$","解啊"));
    }
}
